package com.rabbit.mq;

import com.rabbit.mq.service.RabbitmqService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping
public class RabbitController {
    @Autowired
    private RabbitmqService rabbitmqService;

    @RequestMapping("/send")
    public void send() throws Exception{
        rabbitmqService.send();
    }

    @RequestMapping("/deal_queue_test")
    public void deal_queue_test() throws Exception{
        rabbitmqService.deal_queue_test();
    }

    @RequestMapping("/async")
    public void async() throws Exception{
        rabbitmqService.async();
    }

    @RequestMapping("/sync")
    public void sync() throws Exception{
        rabbitmqService.sync();
    }

    @RequestMapping("/publisher")
    public void publisher() throws Exception{
        rabbitmqService.publisher();
    }

    @RequestMapping("/batch")
    public void batch() throws Exception{
        rabbitmqService.batch();
    }
}
